/* Camera controller header */
#ifndef __VALUETITLES_H__
#define __VALUETITLES_H__

#include <inttypes.h>
#include <avr/pgmspace.h>

#include <canoneos.h>
#include <valuelist.h>

#define VT_MODE_COUNT      16
#define VT_APT_COUNT       54
#define VT_WB_COUNT         7
#define VT_SHSPEED_COUNT   74
#define VT_PSTYLE_COUNT     9
#define VT_ISO_COUNT       19
#define VT_EXPCOR_COUNT    37

const ValueTitle<uint8_t, 4> ApertureTitles[] PROGMEM = 
{
	{0x00,	{' ', ' ', '0', 0 }	},
	{0x08,	{' ', ' ', '1', 0 }     },
	{0x0B,	{'1', '.', '1', 0 }	},
	{0x0C,	{'1', '.', '2', 0 }	},
	{0x0D,	{'1', '.', '2', 0 }	},
	{0x10,	{'1', '.', '4', 0 }	},
	{0x13,	{'1', '.', '6', 0 }	},
	{0x14,	{'1', '.', '8', 0 }	},
	{0x15,	{'1', '.', '8', 0 }	},
	{0x18,	{'2', '.', '0', 0 }	},
	{0x1B,	{'2', '.', '2', 0 }	},
	{0x1C,	{'2', '.', '5', 0 }	},
	{0x1D,	{'2', '.', '5', 0 }	},
	{0x20,	{'2', '.', '8', 0 }	},
	{0x23,	{'3', '.', '2', 0 }	},
	{0x24,	{'3', '.', '5', 0 }	},
	{0x25,	{'3', '.', '5', 0 }	},
	{0x28,	{'4', '.', '0', 0 }	},
	{0x2B,	{'4', '.', '5', 0 }	},
	{0x2C,	{'4', '.', '5', 0 }	},
	{0x2D,	{'5', '.', '0', 0 }	},
	{0x30,	{'5', '.', '6', 0 }	},
	{0x33,	{'6', '.', '3', 0 }	},
	{0x34,	{'6', '.', '7', 0 }	},
	{0x35,	{'7', '.', '1', 0 }	},
	{0x38,	{'8', '.', '0', 0 }	},
	{0x3B,	{'9', '.', '0', 0 }	},
	{0x3C,	{'9', '.', '5', 0 }	},
	{0x3D,	{' ', '1', '0', 0 }	},
	{0x40,	{' ', '1', '1', 0 }	},
	{0x43,	{' ', '1', '3', 0 }	},
	{0x44,	{' ', '1', '3', 0 }	},
	{0x45,	{' ', '1', '4', 0 }	},
	{0x48,	{' ', '1', '6', 0 }	},
	{0x4B,	{' ', '1', '8', 0 }	},
	{0x4C,	{' ', '1', '9', 0 }	},
	{0x4D,	{' ', '2', '0', 0 }	},
	{0x50,	{' ', '2', '2', 0 }	},
	{0x53,	{' ', '2', '5', 0 }	},
	{0x54,	{' ', '2', '7', 0 }	},
	{0x55,	{' ', '2', '9', 0 }	},
	{0x58,	{' ', '3', '2', 0 }	},
	{0x5B,	{' ', '3', '6', 0 }	},
	{0x5C,	{' ', '3', '8', 0 }	},
	{0x5D,	{' ', '4', '0', 0 }	},
	{0x60,	{' ', '4', '5', 0 }	},
	{0x63,	{' ', '5', '1', 0 }	},
	{0x64,	{' ', '5', '4', 0 }	},
	{0x65,	{' ', '5', '7', 0 }	},
	{0x68,	{' ', '6', '4', 0 }	},
	{0x6B,	{' ', '7', '2', 0 }	},
	{0x6C,	{' ', '7', '6', 0 }	},
	{0x6D,	{' ', '8', '0', 0 }	},
	{0x70,	{' ', '9', '1', 0 }	}
};

const ValueTitle<uint8_t, 5> ShutterSpeedTitles[] PROGMEM =
{
	{0x0c,	{'B','u','l','b',0} },
	{0x10,	{' ','3','0','"',0} },
	{0x13,	{' ','2','5','"',0} },
	{0x14,	{' ','2','0','"',0} },
	{0x15,	{' ','2','0','"',0} },
	{0x18,	{' ','1','5','"',0} },
	{0x1B,	{' ','1','3','"',0} },
	{0x1C,	{' ','1','0','"',0} },
	{0x1D,	{' ','1','0','"',0} },
	{0x20,	{' ',' ','8','"',0} },
	{0x23,	{' ',' ','6','"',0} },
	{0x24,	{' ',' ','6','"',0} },
	{0x25,	{' ',' ','5','"',0} },
	{0x28,	{' ',' ','4','"',0} },
	{0x2B,	{' ','3','"','2',0} },
	{0x2C,	{' ',' ','3','"',0} },
	{0x2D,	{' ','2','"','5',0} },
	{0x30,	{' ',' ','2','"',0} },
	{0x33,	{' ','1','"','6',0} },
	{0x34,	{' ','1','"','5',0} },
	{0x35,	{' ','1','"','3',0} },
	{0x38,	{' ',' ','1','"',0} },
	{0x3B,	{' ','0','"','8',0} },
	{0x3C,	{' ','0','"','7',0} },
	{0x3D,	{' ','0','"','6',0} },
	{0x40,	{' ','0','"','5',0} },
	{0x43,	{' ','0','"','4',0} },
	{0x44,	{' ','0','"','3',0} },
	{0x45,	{' ','0','"','3',0} },
	{0x48,	{' ',' ',' ','4',0} },
	{0x4B,	{' ',' ',' ','5',0} },
	{0x4C,	{' ',' ',' ','6',0} },
	{0x4D,	{' ',' ',' ','6',0} },
	{0x50,	{' ',' ',' ','8',0} },
	{0x53,	{' ',' ','1','0',0} },
	{0x54,	{' ',' ','1','0',0} },
	{0x55,	{' ',' ','1','3',0} },
	{0x58,	{' ',' ','1','5',0} },
	{0x5B,	{' ',' ','2','0',0} },
	{0x5C,	{' ',' ','2','0',0} },
	{0x5D,	{' ',' ','2','5',0} },
	{0x60,	{' ',' ','3','0',0} },
	{0x63,	{' ',' ','4','0',0} },
	{0x64,	{' ',' ','4','5',0} },
	{0x65,	{' ',' ','5','0',0} },
	{0x68,	{' ',' ','6','0',0} },
	{0x6B,	{' ',' ','8','0',0} },
	{0x6C,	{' ',' ','9','0',0} },
	{0x6D,	{' ','1','0','0',0} },
	{0x70,	{' ','1','2','5',0} },
	{0x73,	{' ','1','6','0',0} },
	{0x74,	{' ','1','8','0',0} },
	{0x75,	{' ','2','0','0',0} },
	{0x78,	{' ','2','5','0',0} },
	{0x7B,	{' ','3','2','0',0} },
	{0x7C,	{' ','3','5','0',0} },
	{0x7D,	{' ','4','0','0',0} },
	{0x80,	{' ','5','0','0',0} },
	{0x83,	{' ','6','4','0',0} },
	{0x84,	{' ','7','5','0',0} },
	{0x85,	{' ','8','0','0',0} },
	{0x88,	{'1','0','0','0',0} },
	{0x8B,	{'1','2','5','0',0} },
	{0x8C,	{'1','5','0','0',0} },
	{0x8D,	{'1','6','0','0',0} },
	{0x90,	{'2','0','0','0',0} },
	{0x93,	{'2','5','0','0',0} },
	{0x94,	{'3','0','0','0',0} },
	{0x95,	{'3','2','0','0',0} },
	{0x98,	{'4','0','0','0',0} },
	{0x9B,	{'5','0','0','0',0} },
	{0x9C,	{'6','0','0','0',0} },
	{0x9D,	{'6','4','0','0',0} },
	{0xA0,	{'8','0','0','0',0} }
};

const ValueTitle<uint8_t, 5> IsoTitles[] PROGMEM =
{
	{0x28,	{'6',' ',' ',' ',0} },
	{0x30,	{'1','2',' ',' ',0} },
	{0x38,	{'2','5',' ',' ',0} },
	{0x40,	{'5','0',' ',' ',0} },
	{0x48,	{'1','0','0',' ',0} },
	{0x4b,	{'1','2','5',' ',0} },
	{0x4d,	{'1','6','0',' ',0} },
	{0x50,	{'2','0','0',' ',0} },
	{0x53,	{'2','5','0',' ',0} },
	{0x55,	{'3','2','0',' ',0} },
	{0x58,	{'4','0','0',' ',0} },
	{0x5b,	{'5','0','0',' ',0} },
	{0x5d,	{'6','4','0',' ',0} },
	{0x60,	{'8','0','0',' ',0} },
	{0x63,	{'1','0','0','0',0} },
	{0x65,	{'1','2','5','0',0} },
	{0x68,	{'1','6','0','0',0} },
	{0x70,	{'3','2','0','0',0} },
	{0x78,	{'6','4','0','0',0} }
};

const ValueTitle<uint8_t, 7> ExpCorTitles[] PROGMEM =
{
	{0x28,	{'+','5',' ',' ',' ',' ',0} },				
	{0x25,	{'+','4',' ','2','/','3',0} },				
	{0x23,	{'+','4',' ','1','/','3',0} },				
	{0x20,	{'+','4',' ',' ',' ',' ',0} },				
	{0x1d,	{'+','3',' ','2','/','3',0} },				
	{0x1b,	{'+','3',' ','1','/','3',0} },				
	{0x18,	{'+','3',' ',' ',' ',' ',0} },				
	{0x15,	{'+','2',' ','2','/','3',0} },				
	{0x14,	{'+','2',' ','1','/','2',0} },				
	{0x13,	{'+','2',' ','1','/','3',0} },				
	{0x10,	{'+','2',' ',' ',' ',' ',0} },				
	{0x0d,	{'+','1',' ','2','/','3',0} },				
	{0x0c,	{'+','1',' ','1','/','2',0} },				
	{0x0b,	{'+','1',' ','1','/','3',0} },				
	{0x08,	{'+','1',' ',' ',' ',' ',0} },				
	{0x05,	{'+','2','/','3',' ',' ',0} },				
	{0x04,	{'+','1','/','2',' ',' ',0} },				
	{0x03,	{'+','1','/','3',' ',' ',0} },				
	{0x00,	{'0',' ',' ',' ',' ',' ',0} },				
	{0xfd,	{'-','1','/','3',' ',' ',0} },				
	{0xfc,	{'-','1','/','2',' ',' ',0} },				
	{0xfb,	{'-','2','/','3',' ',' ',0} },				
	{0xf8,	{'-','1',' ',' ',' ',' ',0} },				
	{0xf5,	{'-','1',' ','1','/','3',0} },				
	{0xf4,	{'-','1',' ','1','/','2',0} },				
	{0xf3,	{'-','1',' ','2','/','3',0} },				
	{0xf0,	{'-','2',' ',' ',' ',' ',0} },				
	{0xed,	{'-','2',' ','1','/','3',0} },				
	{0xec,	{'-','2',' ','1','/','2',0} },				
	{0xeb,	{'-','2',' ','2','/','3',0} },				
	{0xe8,	{'-','3',' ',' ',' ',' ',0} },			
	{0xe5,	{'-','3',' ','1','/','3',0} },			
	{0xe3,	{'-','3',' ','2','/','3',0} },			
	{0xe0,	{'-','4',' ',' ',' ',' ',0} },			
	{0xdd,	{'-','4',' ','1','/','3',0} },			
	{0xdb,	{'-','3',' ','2','/','3',0} },			
	{0xd8,	{'-','5',' ',' ',' ',' ',0} }			
};

const ValueTitle<uint8_t, 4> ModeTitles[] PROGMEM =
{
	{0,	{'P',' ',' ',0} },
	{1,	{'T','v',' ',0} },
	{2,	{'A','v',' ',0} },
	{3,	{'M',' ',' ',0} },
	{4,	{'B','l','b',0} },
	{5,	{'A','-','D',0} },
	{6,	{'D','E','P',0} },
	{7,	{'C',' ',' ',0} },
	{8,	{'L','c','k',0} },
	{9,	{'G','r','n',0} },
	{10,    {'N','g','h',0} },
	{11,    {'S','p','r',0} },
	{13,    {'L','n','d',0} },
	{14,    {'C','l','s',0} },
	{15,    {'N','/','F',0} }
};

const ValueTitle<uint8_t, 4> WbTitles[] PROGMEM = 
{ 
	{0,	{'A','W','B',0} },
	{1,	{'D','a','y',0} },
	{2,	{'C','l','d',0} }, 
	{3,     {'T','n','g',0} },
	{4,     {'F','l','r',0} },
	{5,	{'S','t','r',0} },
	{6,     {'W','/','P',0} },
	{8,	{'S','h','d',0} }
};

const ValueTitle<uint8_t, 4> PStyleTitles[] PROGMEM = 
{ 
	{0x21,	{'U','s','1',0} },
	{0x22,	{'U','s','2',0} }, 
	{0x23,	{'U','s','3',0} },
	{0x81, 	{'S','t','d',0} },
	{0x82, 	{'P','r','t',0} },
	{0x83, 	{'L','n','d',0} },
	{0x84,	{'N','t','l',0} },
	{0x85, 	{'F','t','h',0} },
	{0x86,	{'M','o','n',0} }
};

#endif //__VALUETITLES_H__
